//
//  IntroduceViewController.m
//  MoGuRadio
//
//  Created by 李响 on 15/7/2.
//  Copyright (c) 2015年 mogu.com 蘑菇科技. All rights reserved.
//

#import "IntroduceViewController.h"

@interface IntroduceViewController ()

@end

@implementation IntroduceViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"功能介绍";
    UIImageView * ImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)];
    [ImageView setImage:[UIImage imageNamed:@"guanyu.jpg"]];
    [self.view addSubview:ImageView];
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(self.view.bounds.size.width / 5, self.view.bounds.size.height / 10, self.view.bounds.size.width * 3 / 5, self.view.bounds.size.height * 8 / 10)];
    //背景颜色透明
    label.backgroundColor = [UIColor clearColor];
    //文本内容首行缩进
    label.text = @"     这是一款专注于用户体验的软件.这款软件有电台播放功能,您可以轻松、愉悦的享受生活!工作后、学习累了、业余时间,做点什么呢?!打开这款软件,您的问题轻松搞定.它具有专属推荐功能,专为选择为难的您,推出最好的最适合您的电台信息.同时这里还有非常全面的电台分类,如果您已经准备好了要听什么,不妨去分类中选择好您的专属频道.如果您对频道的要求很严格,可以试试搜功能,一步到位,让您省去繁琐,轻松享受.\n        或许您以为我们会收取费用,不会的,我们为您提供的全部电台,您都可以免费收听.我们只为悦享品质!";
    //文本颜色
    label.textColor = [UIColor purpleColor];
    //文本对其方式
    //label.textAlignment = NSTextAlignmentCenter;//居中
    //适应行数
    label.numberOfLines = 0;
    //让label适应内容的高度
    [label sizeToFit];
    [self.view addSubview:label];
    [label release];
    
    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc]initWithString:label.text];;
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init];
    [paragraphStyle setLineSpacing:5];
    [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, label.text.length)];
    label.attributedText = attributedString;
}
- (void)viewWillAppear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden = YES;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
